<!--社区列表-->
<template>
    <div>
            <el-row :gutter="20" class="yx_el_row">
            </el-row>
            <el-table class="yx_table" border :data="volunteersignlist">
                <el-table-column prop="index" label="序号" width="100">
                </el-table-column>
                <el-table-column prop="service_name" label="报名项目" width="180">
                </el-table-column>
                <el-table-column prop="realname" label="姓名" width="180">
                </el-table-column>
                <el-table-column prop="phone" label="手机号" width="180">
                </el-table-column>
                <el-table-column prop="remark" label="意向说明">
                </el-table-column>
            </el-table>
            <el-pagination class="yx_page"
                           background
                           @current-change="handle_current_change"
                           @size-change="handle_size_change"
                           :page-sizes="page_sizes"
                           :page-size="page_size"
                           layout="prev, pager, next,sizes, total"
                           :total="total_count">
            </el-pagination>
    </div>
</template>

<script>
    export default {
        name: 'SignList',
        inject:['reload'],
        data() {
            return {
                current_page:1,
                page_size:20
            }
        },
        methods: {
            getList(){
                var send_data={
                    api_token:this.$store.getters.getSessionId,
                    current_page:this.current_page,
                    page_size:this.page_size
                }
                this.$store.dispatch('loadVolunteerSignList',send_data);
            },
            //跳转页
            handle_current_change(current_page){
                //当前页码数
                this.current_page=current_page;
                this.getList();
            },
            //修改条数
            handle_size_change(page_size){
                this.current_page=1;
                this.page_size=page_size;
                this.getList();
            }
        },
        created() {
            //加载列表
            this.getList();
        },
        computed:{
            volunteersignlist(){
                return this.$store.getters.getVolunteerSignList;
            },
            total_count(){
                return this.$store.getters.getVolunteerSignTotalCount;
            },
            page_sizes(){
                return this.$store.state.page_sizes;
            },
        }
    }
</script>

<style>
     @import url('../../../assets/css/table.css');
</style>
